﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace AnthStat.WPF.Presentation.Controls
{
    public class MessageBox : ContentControl
    {
        static MessageBox()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(MessageBox), new FrameworkPropertyMetadata(typeof(MessageBox)));
        }

        public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(string), typeof(MessageBox), new FrameworkPropertyMetadata(String.Empty, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));
        public string Title
        {
            get
            {
                return (GetValue(TitleProperty)).ToString();
            }
            set
            {
                SetValue(TitleProperty, value);
            }
        }

        public static readonly DependencyProperty MessageBoxButtonProperty = DependencyProperty.Register("MessageBoxButton", typeof(MessageBoxButton), typeof(MessageBox), new FrameworkPropertyMetadata(MessageBoxButton.OKCancel, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));
        public MessageBoxButton MessageBoxButton
        {
            get { return (MessageBoxButton)GetValue(MessageBoxButtonProperty); }
            set
            {
                SetValue(MessageBoxButtonProperty, value);
            }
        }

        public static readonly DependencyProperty AcceptCommandProperty = DependencyProperty.Register("AcceptCommand", typeof(ICommand), typeof(MessageBox));
        public ICommand AcceptCommand
        {
            get
            {
                return (ICommand)GetValue(AcceptCommandProperty);
            }
            set
            {
                SetValue(AcceptCommandProperty, value);
            }
        }

        public static readonly DependencyProperty RejectCommandProperty = DependencyProperty.Register("RejectCommand", typeof(ICommand), typeof(MessageBox));
        public ICommand RejectCommand
        {
            get
            {
                return (ICommand)GetValue(RejectCommandProperty);
            }
            set
            {
                SetValue(RejectCommandProperty, value);
            }
        }

        public static readonly DependencyProperty CancelCommandProperty = DependencyProperty.Register("CancelCommand", typeof(ICommand), typeof(MessageBox));
        public ICommand CancelCommand
        {
            get
            {
                return (ICommand)GetValue(CancelCommandProperty);
            }
            set
            {
                SetValue(CancelCommandProperty, value);
            }
        }

        //public void Foo()
        //{
        //    System.Windows.MessageBoxButton.
        //}
    }
}
